// charts的控制器
angular.module('password.controller', ['password.service'])

  .controller('PasswordCtrl', function ($scope, $state, $rootScope, $ionicLoading, $http, $ionicHistory, $stateParams, $sce, $ionicModal, $ionicPopup, $ionicPopover) {


      $scope.gestureLockChange = function () {
        if ($scope.gestureLockEnable.checked == true) {
          $state.go("tab.gesturelock")
        } else {
          if (confirm("您确定要取消手势密码功能？")) {
            localStorage.removeItem("gestureLockEnable");
            localStorage.removeItem("passwordxx");
            localStorage.removeItem("chooseType")
          } else {
            $scope.gestureLockEnable.checked = true
          }
        }
      };
      $scope.gesturePwdChange = function () {
        if (confirm("您确定要重新设置手势密码？")) {
          localStorage.removeItem("gestureLockEnable");
          localStorage.removeItem("passwordxx");
          localStorage.removeItem("chooseType");
          $state.go("tab.gesturelock")
        }}



  })
